CMake: improve build scripts#6331
CMake: improve build scripts#6331JacobBarthelmeh merged 9 commits intowolfSSL:masterfrom oltolm:cmake
Conversation
|
Can one of the admins verify this patch? |
|
Hi @oltolm , Thank you for these CMake fixes. In order to accept this we'll need a signed contributor agreement. Can you email support@ wolfssl dot com and mention this PR and provide some additional details about your project and location? Thanks, |
|
Hi David,
I sent an email to the support.
|
|
Signed contributor agreement received and approved. |
dgarske
left a comment
There was a problem hiding this comment.
Great fixes here. Just one comment about the location of the new cmake file.
|
OK to test |
dgarske
left a comment
There was a problem hiding this comment.
Over to @JacobBarthelmeh to finalize. Please squash on merge.
|
Retest this please |
|
@oltolm thank you for your work on this! It is a good step in the right direction for cmake + mingw32 support. When building wolfSSL were you able to successfully run the crypto unit tests? Using |
|
I use the mingw32 and mingw64 subsystems of MSYS2. If I just build with default CMake options then the test runs successfully in mingw32 and mingw64. |
* make wolfssl compile with Mingw-w64 * cmake: CMAKE_SYSTEM_PROCESSOR is AMD64 on Windows * cmake: use target_compile_definitions instead of add_definitions * cmake: change default value of WOLFSSL_BUILD_OUT_OF_TREE_DEFAULT to ON * cmake: link crypt32.lib on Windows * cmake: export wolfssl * move Config.cmake.in to cmake directory * revert changes to .gitignore * add Config.cmake.in to include.am
Description
Improve CMake build scripts. WolfSSL is used by rpcs3, so some problems with the CMake build scripts became apparent.
target_compile_definitions(wolfssl INTERFACE SIZEOF_LONG=${SIZEOF_LONG} SIZEOF_LONG_LONG=${SIZEOF_LONG_LONG})to compile with Mingw-w64 ifWOLFSSL_FAST_MATH=ON. I fixed it intypes.h.crypt32.lib.WOLFSSL_BUILD_OUT_OF_TREEisOFF, which means thatconfig.his generated in the source tree and is invisible because it is ignored by git. I changed the default to out-of-tree-build and removedconfig.hfrom.gitignore.find_package(WolfSSL). To properly export WolfSSL i changedadd_definitionstotarget_compile_definitions.Testing
I compiled WolfSSL as part of rpcs3 and stand-alone.